home *** CD-ROM | disk | FTP | other *** search
-
-
-
- SSSSTTTTAAAATTTTFFFFSSSS((((2222)))) SSSSTTTTAAAATTTTFFFFSSSS((((2222))))
-
-
-
- NNNNAAAAMMMMEEEE
- statfs, fstatfs - get file system information
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssttttaaaattttffffssss....hhhh>>>>
-
- iiiinnnntttt ssssttttaaaattttffffssss ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ppppaaaatttthhhh,,,, ssssttttrrrruuuucccctttt ssssttttaaaattttffffssss ****bbbbuuuuffff,,,, iiiinnnntttt lllleeeennnn,,,, iiiinnnntttt ffffssssttttyyyypppp))));;;;
-
- iiiinnnntttt ffffssssttttaaaattttffffssss ((((iiiinnnntttt ffffiiiillllddddeeeessss,,,, ssssttttrrrruuuucccctttt ssssttttaaaattttffffssss ****bbbbuuuuffff,,,, iiiinnnntttt lllleeeennnn,,,, iiiinnnntttt ffffssssttttyyyypppp))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _s_t_a_t_f_s returns a ``generic superblock'' describing a file system. It can
- be used to acquire information about mounted as well as unmounted file
- systems, and usage is slightly different in the two cases. In all cases,
- _b_u_f is a pointer to a structure (described below) which will be filled by
- the system call, and _l_e_n is the number of bytes of information which the
- system should return in the structure. _L_e_n must be no greater than
- ssssiiiizzzzeeeeooooffff ((((ssssttttrrrruuuucccctttt ssssttttaaaattttffffssss)))) and ordinarily it will contain exactly that value;
- if it holds a smaller value the system will fill the structure with that
- number of bytes. (This allows future versions of the system to grow the
- structure without invalidating older binary programs.)
-
- If the file system of interest is currently mounted, _p_a_t_h should name a
- file which resides on that file system. In this case the file system
- type is known to the operating system and the _f_s_t_y_p argument must be
- zero. For an unmounted file system _p_a_t_h must name the block special file
- containing it and _f_s_t_y_p must contain the (non-zero) file system type. In
- both cases read, write, or execute permission of the named file is not
- required, but all directories listed in the path name leading to the file
- must be searchable.
-
- The _s_t_a_t_f_s structure pointed to by _b_u_f includes the following members:
- short f_fstyp; /* File system type */
- long f_bsize; /* Block size */
- long f_frsize; /* Fragment size */
- long f_blocks; /* Total number of blocks */
- long f_bfree; /* Count of free blocks */
- long f_files; /* Total number of file nodes */
- long f_ffree; /* Count of free file nodes */
- char f_fname[6]; /* Volume name */
- char f_fpack[6]; /* Pack name */
-
- In ABI N32 applications, the fields ffff____bbbblllloooocccckkkkssss, ffff____bbbbffffrrrreeeeeeee, ffff____ffffiiiilllleeeessss, and
- ffff____ffffffffrrrreeeeeeee are of type ________iiiinnnntttt66664444____tttt (lllloooonnnngggg lllloooonnnngggg) instead of lllloooonnnngggg.
-
- _f_s_t_a_t_f_s is similar, except that the file named by _p_a_t_h in _s_t_a_t_f_s is
- instead identified by an open file descriptor _f_i_l_e_d_e_s obtained from a
- successful _o_p_e_n(2), _c_r_e_a_t(2), _d_u_p(2), _f_c_n_t_l(2), or _p_i_p_e(2) system call.
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- SSSSTTTTAAAATTTTFFFFSSSS((((2222)))) SSSSTTTTAAAATTTTFFFFSSSS((((2222))))
-
-
-
- _s_t_a_t_f_s obsoletes _u_s_t_a_t(2) and should be used in preference to it in new
- programs.
-
- For XFS filesystems with real-time subvolumes (see xfs(4)), the _s_t_a_t_f_s(2)
- system call returns information concerning the data portion of the
- filesystem only. The _s_y_s_s_g_i(2) system call with the SGI_XFS_OPERATIONS
- request argument can be used to acquire information concerning the size
- and usage of space within the real-time portion of the filesystem.
-
- _s_t_a_t_f_s and _f_s_t_a_t_f_s will fail if one or more of the following are true:
-
- [ENOTDIR] A component of the path prefix is not a directory.
-
- [ENOENT] The named file does not exist.
-
- [EACCES] Search permission is denied for a component of the path
- prefix.
-
- [EFAULT] _B_u_f or _p_a_t_h points to an invalid address.
-
- [EBADF] _F_i_l_d_e_s is not a valid open file descriptor.
-
- [EINVAL] _F_s_t_y_p is an invalid file system type; _p_a_t_h is not a block
- special file and _f_s_t_y_p is nonzero; _l_e_n is negative or is
- greater than ssssiiiizzzzeeeeooooffff ((((ssssttttrrrruuuucccctttt ssssttttaaaattttffffssss)))).
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Upon successful completion a value of 0 is returned. Otherwise, a value
- of -1 is returned and _e_r_r_n_o is set to indicate the error.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- chmod(2), chown(2), creat(2), link(2), mknod(2), pipe(2), read(2),
- statvfs(2), time(2), unlink(2), utime(2), write(2), fs(4).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-